<% content_for :head do -%>
<script type="text/javascript" src="http://www.google.com/jsapi?key=ABQIAAAAJod3rJ1UD4NbyqMUYncq8hQS7nTv3quct8Dfs1xHBEpc6akp3BQcwtj4N50dXAtP6pFx7Iyut0DZIw"></script>
<script type="text/javascript">
// http://dizhen.1kg.org
// ABQIAAAAJod3rJ1UD4NbyqMUYncq8hQG_ebKyVlumVbmtuCcHWWSXWuzJRSLTlxEaZOWrN4noIb8cWtW0gwanA
google.load("feeds", "1");

function initialize() {
  var feed = new google.feeds.Feed("http://www.ngocn.org/bbs/rss.php?fid=43&auth=0");
  feed.load(function(result) {
    if (!result.error) {
      var container = document.getElementById("feed");
      for (var i = 0; i < result.feed.entries.length; i++) {
        var entry = result.feed.entries[i];
        var div = document.createElement("div");
        div.appendChild(document.createTextNode(entry.title));
        container.appendChild(div);
      }
    }
  });
}
google.setOnLoadCallback(initialize);

</script>
<% end -%>
<h1>最新消息</h1>
<h2>地震播报员<span class="tip">在饭否</span></h2>
<div style="margin:10px; padding:10px; border:5px solid #FF0000">
  <div id="feed"></div>
  <p style="text-align:right"><span class="tip">加<a href="http://fanfou.com/dizhen" target="_blank">地震播报员</a>为好友，报告最新灾情信息</span></p>
</div>
